<!DOCTYPE html>
<html>
<head>
  <title></title>
</head>
<body>
<div id="app">
  <!-- 1. 在事件函数不必传参时，可以这样写，注意：不能带() -->
  <input type="text" @keyup="handleKeyUp">
  <br>
  <!-- 2. 手动传入$event对象 -->
  <input type="text" @keyup="handleKeyUp($event)">
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.min.js"></script>
<script type="text/javascript">
  let vm = new Vue({
    el: '#app',
    methods: {
      handleKeyUp (event) {
        console.log(event.key, event)
      }
    }
  })
</script>
</body>
</html>